package river_city_ransom.tests;

import exceptions.ComposantError;
import river_city_ransom.contracts.Position_C;
import river_city_ransom.implementations.Position_I;
import river_city_ransom.services.Position;
import junit.framework.TestCase;


public class Position_T extends TestCase {
	public void test_init_ok() {
		try {
			int x = 10, y = -5, z = 0;
			Position p = new Position_C(new Position_I(0, 0, 0));
			p.init(x, y, z);
			assertTrue(p.x() == x);
			assertTrue(p.y() == y);
			assertTrue(p.z() == z);
		}
		catch(ComposantError e) {
			System.err.println("Position::test_init_ok\n\t" + e.getMessage());
			fail(e.getMessage());
		}
	}
}
